#!/usr/bin/env python
# -*- encoding: utf-8 -*-
'''
@Author  :   JingV
@Version :   1.0
@Contact :   None
@License :   None
@Desc    :   None
'''


class Solution(object):
    def generate(self, numRows):
        if numRows == 0:
            return []
        result = [[1]]
        if numRows == 1:
            return result
        result.append([1, 1])
        if numRows == 2:
            return result
        count = 2
        while count < numRows:
            temp = [1]
            for i in range(1, len(result[-1])):
                temp.append(result[-1][i-1] + result[-1][i])
            temp.append(1)
            result.append(temp)
            count += 1
        return result


def main():
    solution = Solution()
    tests = [5]
    for numRows in tests:
        print(solution.generate(numRows))


if __name__ == "__main__":
    main()
